﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace zichan.Entity
{
     public class AssetTemp
    {
        [Key]
        public int Id { get; set; }
        [Required(ErrorMessage = "资产名称不为空")]
        public string Name { get; set; }
        [Required(ErrorMessage = "资产类型不能为空")]
        public int AssetClassId { get; set; }
        [NotMapped]
        public string AssetClassName { get; set; }
        [Required(ErrorMessage = "所属公司不能为空")]
        public int CompanyId { get; set; }
        [NotMapped]
        public string CompanyName { get; set; }
        [NotMapped]
        public int Number { get; set; }
        [Required(ErrorMessage = "采购人不为空")]
        public int BuyerId { get; set; }
        [NotMapped]
        public string BuyerName { get; set; }
        [Required(ErrorMessage = "时间不能为空")]
        public DateTime BuyTime { get; set; }
        [Required(ErrorMessage = "接收人不能为空")]
        public int Recipient { get; set; }
        /// <summary>
        /// 资产编码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 接收地
        /// </summary>
        public string CalculatedGround { get; set; }
        /// <summary>
        /// 供应商
        /// </summary>
        public string Supplier { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        public int? UserId { get; set; }
        [NotMapped]
        public string UserName { get; set; }

    }
}
